package com.neueedu.android.entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class Ticket  implements Serializable {

    private String name;

    private String startTime;
    private String endTime;
    private boolean startFlag;
    private boolean endFlag;

    private String day;


    private List<String> seats = new ArrayList<>();


    private String[] seatNames = {"软卧","硬卧","商务","一等座","二等座","无座"};



    public Ticket(String name, String startTime, String endTime, boolean startFlag, boolean endFlag, String day) {
        this.name = name;
        this.startTime = startTime;
        this.endTime = endTime;
        this.startFlag = startFlag;
        this.endFlag = endFlag;
        this.day = day;

        addSeats();



    }

    private void addSeats() {
        Random random = new Random();
        for (int i = 0; i < 4; i++) {
            this.seats.add(seatNames[random.nextInt(seatNames.length)]+":"+random.nextInt(100));
        }

    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public boolean isStartFlag() {
        return startFlag;
    }

    public void setStartFlag(boolean startFlag) {
        this.startFlag = startFlag;
    }

    public boolean isEndFlag() {
        return endFlag;
    }

    public void setEndFlag(boolean endFlag) {
        this.endFlag = endFlag;
    }

    public String getDay() {
        return day;
    }

    public void setDay(String day) {
        this.day = day;
    }

    public List<String> getSeats() {
        return seats;
    }

    public void setSeats(List<String> seats) {
        this.seats = seats;
    }

    public String[] getSeatNames() {
        return seatNames;
    }

    public void setSeatNames(String[] seatNames) {
        this.seatNames = seatNames;
    }
}
